package com.xzcedu.regexp;

import java.util.regex.Pattern;

/**
 * @author 徐州城
 * @version 1.0
 * 演示matches方法，用于整体匹配，用于验证输入的字符串是否满洲条件使用
 */
public class PatternMethod {
    public static void main(String[] args) {
        String content = "I am hsp from hspedu.com";
        //String pattern = "hspedu";
        String pattern = ".*hspedu.*";
        boolean isMatch = Pattern.matches(pattern, content);
        System.out.println("是否整体匹配成功 " + isMatch);
    }
}
